using UnityEngine;
using System.Collections;

public class ButtonController : MonoBehaviour {
	public bool isFat = false;
	// Use this for initialization
	void Start ()
	{
		 Messenger.AddListener("Ate food", OnAteFood );
		 Messenger.AddListener("Threw up", OnThrewUp );
	}
	
	// Update is called once per frame
	void Update ()
	{
	
	}

	void OnAteFood()
	{
		isFat = true;
	}

	void OnThrewUp()
	{
		isFat = false;
	}

	void OnTriggerEnter(Collider other)
	{
		if(isFat)
		{
			transform.Translate(new Vector3(0,-1,0));
		}
	}
}

